<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta charset="UTF-8">
    <meta http-equiv="Cache-Control" content="max-age=1800"/>
    <title>蚂蚁鲜生</title>
    <link rel="stylesheet" type="text/css" href="./css/index.css?v0.5.5">
    <link href="./js/vendor/swiper/swiper-4.1.0.min.css" rel="stylesheet">
    <script type="text/javascript">
        window.zhuge = window.zhuge || [];window.zhuge.methods = "_init debug identify track trackLink trackForm page".split(" ");
        window.zhuge.factory = function(b) {return function() {var a = Array.prototype.slice.call(arguments);a.unshift(b);
            window.zhuge.push(a);return window.zhuge;}};for (var i = 0; i < window.zhuge.methods.length; i++) {
            var key = window.zhuge.methods[i];window.zhuge[key] = window.zhuge.factory(key);}window.zhuge.load = function(b, x) {
            if (!document.getElementById("zhuge-js")) {var a = document.createElement("script");var verDate = new Date();
                var verStr = verDate.getFullYear().toString()+ verDate.getMonth().toString() + verDate.getDate().toString();
                a.type = "text/javascript";a.id = "zhuge-js";a.async = !0;a.src = (location.protocol == 'http:' ? "http://sdk.zhugeio.com/zhuge.min.js?v=" : 'https://zgsdk.zhugeio.com/zhuge.min.js?v=') + verStr;
                a.onerror = function(){window.zhuge.identify = window.zhuge.track = function(ename, props, callback){if(callback && Object.prototype.toString.call(callback) === '[object Function]')callback();};};
                var c = document.getElementsByTagName("script")[0];c.parentNode.insertBefore(a, c);window.zhuge._init(b, x)}};
        window.zhuge.load('93912631fa9d4478b174b225769d7e8d');//配置应用的AppKey
    </script>
    <script>
        var _hmt=_hmt||[];(function(){var hm=document.createElement("script");hm.src="https://hm.baidu.com/hm.js?f774540fa3005701a8107690d7d10733";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(hm,s)})();
    </script>
</head>
<body>
<div class="container-fluid">
    <div class="header">
        <div class="header_address"><img src="./images/ui_icon/Shape.png" alt=""><span class="address"></span></div>
        <div class="header-right">
            <div class="header_code header_icon" href="javascript:;"><img src="./images/qrCode.png" alt=""><span>扫码购买</span></div>
            <div class="header_balance header_icon" href="javascript:;"><img src="./images/Group.png" alt=""><span>充值</span></div>
            <div class="header_me header_icon" href="javascript:;"><img src="./images/Shape.png" alt=""><span>我的</span></div>
        </div>
    </div>
    <div class="container">
        <div class="food-container">
            <ul class="food-type">
                <!--<li class="type-style" data-id="12">-->
                    <!--<h1>热销</h1>-->
                <!--</li>-->
                <!--<li class="type-style">-->
                    <!--<h1>热销</h1>-->
                <!--</li>-->
            </ul>
            <ul id="food-right" class="food-list clearfix">
                <!--banner-->
                <li class="food-list_content">
                    <div class="banner-container swiper-container">
                        <div class="swiper-wrapper">
                            <!--<div class="swiper-slide">-->
                                <!--<a class="banner-link" href="javascript:;">-->
                                <!--<img class="banner" src="">-->
                                <!--</a>-->
                            <!--</div>-->
                            <!--<div class="swiper-slide">-->
                                <!--<a class="banner-link" href="javascript:;">-->
                                    <!--<img class="banner" src="">-->
                                <!--</a>-->
                            <!--</div>-->
                        </div>
                        <div class="swiper-pagination"></div>
                    </div>
                </li>
                <!--<li class="food-item">-->
                    <!--<img class="food-image" src="./images/food-image.png" alt="">-->
                    <!--<div class="name">大牌鸡汁饭</div>-->
                    <!--<div class="tag-list">-->
                        <!--<span class="tag-item">全家同款</span>-->
                    <!--</div>-->
                    <!--<div class="buy-info">-->
                        <!--<section class="food-price">-->
                            <!--<div class="sales-price">-->
                                <!--<span class="small">¥</span><span>18</span>-->
                            <!--</div>-->
                            <!--<div class="original-price">-->
                                <!--<span class="small">¥</span><span>18</span>-->
                            <!--</div>-->
                        <!--</section>-->
                        <!--<section class="cart_module">-->
                            <!--<section class="cart_button">-->
                            <!--<span class="reduce_icon">-->
                                <!--<img src="./images/icon/icon-reduce.png" alt="">-->
                            <!--</span>-->
                                <!--<span class="cart_num">1</span>-->
                                <!--<span class="add_icon">-->
                                <!--<img src="./images/icon/icon-add.png" alt="">-->
                            <!--</span>-->
                            <!--</section>-->
                        <!--</section>-->
                    <!--</div>-->
                <!--</li>-->
            </ul>
            <div style="clear: both"></div>
        </div>
    </div>
    <!--购物车-->
    <div class="cart-container">
        <div class="cart-layout">
            <div class="cart-info">
                <div class="selected" onclick=""><div class="cart-layout_logo"><img src="./images/ui_icon/icon_购买.png" alt=""><span class="selected-num">1</span></div></div>
                <div class="cart-price">
                  ¥<span class="total-price">0</span>
                  <div class="full-sub"></div>
                </div>
            </div>
            <div class="submit-btn-red" onclick="">去结算</div>
        </div>
    </div>
</div>

<!--购物车选项详情-->
<div class="cart-layout_top">
    <div class="cart-layout_topOne" onclick="">
    </div>
    <div class="cart-layout_topTow">
    <div class="cart-layout_topTitle">
        <div class="cart-layout_topIcon">已选商品</div>
        <div class="cart-layout_topClear" onclick=""><span><img src="./images/ui_icon/icon_清空.png" alt=""></span>清空</div>
    </div>
        <div style="clear: both"></div>
    <div class="cart-layout_topDe">
        <!--<div class="cart-layout_topfoods">-->
        <!--红烧肉-->
        <!--</div>-->
        <!--<div class="cart-layout_topPrice">-->
        <!--￥<span class="">75</span>-->
        <!--</div>-->
        <!--<div class="cart-layout_top">-->
        <!--<span class="cart-layout_topReduceIcon">-->
        <!--<img src="./images/icon/icon-reduce.png" alt="">-->
        <!--</span>-->
        <!--<span class="cart_topNum">1</span>-->
        <!--<span class="cart-layout_topAddIcon">-->
        <!--<img src="./images/icon/icon-add.png" alt="">-->
        <!--</span>-->
        <!--</div>-->
    </div>
    </div>
</div>
<!--购物车选项详情、、、-->
<!--红包注册弹出层-->
<div class="packet—container">
    <img class="food-detail-mask packe_mask" src="./images/mask.png">
    <div class="paket_content">
        <div class="paket-con">
            <div class="packet_title">蚁哥送你超级大红包</div>
            <div class="paket_knock"><span class="packet_num">6</span>元立减红包</div>
        <div class="packet—phone">
            <div><input type="number" pattern="[0-9]*" class="packet_inp phone" placeholder="请输入手机号码 领红包"></div>
            <div class="packet_validation">
                <input type="number" pattern="[0-9]*" class="packet_put" placeholder="请输入验证码">
                <div class="obtain" onclick="">获取验证码</div>
            </div>
            <div class="packet_inp packet_led" onclick="">立即领取</div>
        </div>
        <div class="paket_close"></div>
    </div>
        </div>
</div>
<!-------------------->
<!--红包注册成功弹出层-->
<div class="packet—succe-container">
    <img class="food-detail-mask packet—succe_mask" src="./images/mask.png">
    <div class="succe-content">
        <div class="title">
            <span class="succe_title">恭喜您!</span>
            <span class="succe_knock">获得蚂蚁鲜生新人大红包</span>
        </div>
        <div class="succe_vouchers">
            <div class="succe_price">￥<span class="succe_num"></span></div>
            <div class="succe_new"><span class="succe_xin">新人专享礼包</span><span class="succe_quan">全场通用</span></div>
        </div>
        <div class="succe_close"></div>
    </div>
</div>
<!------------------->
<!--充值弹出层-->
<div class="topUp-container">
    <!--<img class="food-detail-mask share_back" src="./images/mask.png">-->
    <div class="topUp_content">
        <img src="https://antfresh.oss-cn-hangzhou.aliyuncs.com/m/yearDesc/index-sz.png" alt="">
        <div class="submit-container">
            <div class="topUp—submit" onclick="">查看详情</div>
            <div class="topUp_close" onclick=""></div>
        </div>
    </div>
</div>
<!--活动弹出层-->
<div class="activity-container">
    <img src="http://antfresh-dev.oss-cn-hangzhou.aliyuncs.com/m/static/images/icon/gao.jpg">
    <!--<div class="activity—btn" onclick="">立即领取</div>-->
    <div class="activity-close"></div>
</div>
<!--扫码指引层-->
<div class="qrCode">
    <div class="qrCode_layer" href="javascript:;"><img src="./images/qrCode.png" alt=""><span>扫码购买</span></div>
    <img class="qrCode_guide" src="./images/guide.png" alt="">
    <div class="qrCode_text">扫条形码<br>加入购物车</div>
</div>
<!------------------>
<!--菜品详情-->
<div class="food-detail-container">
    <img class="food-detail-mask" src="./images/mask.png">
    <div class="food-detail-layout food-item">
        <div class="icon-close"></div>
        <img class="food-image_popup" src="" alt="">
        <div class="name"></div>
        <div class="tag-list">
            <span class="tag-item"></span>
        </div>
        <div class="food-desc-box">
            <h4>商品详情描述</h4>
            <div class="food-desc"></div>
        </div>
        <div class="buy-info">
            <section class="food-price">
                <div class="sales-price">
                    <span class="small">¥</span><span id="sales-price"></span>
                </div>
                <div class="original-price">
                    <span class="small">¥</span><span id="original-price"></span>
                </div>
            </section>
            <section class="cart_module">
                <section class="cart_one" onclick="">
                    <div>加入购物车</div>
                </section>
                <section class="cart_button cart_tow">
                    <span class="reduce_icon">
                    <img src="./images/ui_icon/icon_jian.png" alt="">
                    </span>
                    <span class="cart_num">1</span>
                    <span class="add_icon">
                        <img src="./images/ui_icon/icon_add.png" alt="">
                    </span>
                </section>
            </section>
        </div>
    </div>
</div>
<!--菜品详情、、、-->
<!--message-->
<div class="dialog-dark" style="display: none"></div>
<div id="common-dialog" class="dialog" style="display: none">
    <span class="context"></span>
</div>
<!--message、、-->
<!--loading-->
<div class="loding">
    <img src="./images/icon/loding.gif" alt="">
</div>
<!--loadin、、、-->

</body>
<script>
    var ua = navigator.userAgent;
    var aplipay = /AliPayClient/i.test( ua.toLowerCase() );
    // 动态加载js脚本文件
    function loadScript(url) {
        console.log('aaa')
        var script = document.createElement("script");
        script.type = "text/javascript";
        script.src = url;
        document.body.appendChild(script);
        console.log(script)
    }
    // 判断是否是支付宝
    if(aplipay){
        loadScript("https://gw.alipayobjects.com/as/g/h5-lib/alipayjsapi/3.1.0/alipayjsapi.inc.min.js");
    }else{
        loadScript("https://res.wx.qq.com/open/js/jweixin-1.2.0.js");
        window.onload = function () {
            $.ajax({
                type: "POST",
                url: configApi("/h5/get-jsapi-sign-package"),
                data: {
                    "url": window.location.href
                },
                dataType: "json",
                success: function(data){
                    if (data.success) {
                        console.log(data.data)
                        var signPackage = data.data.signPackage
                        var appId = signPackage.appId;
                        var timestamp = signPackage.timestamp;
                        var nonceStr = signPackage.nonceStr;
                        var signature = signPackage.signature;
                        wx.config({
                            debug:false,
                            appId: appId,
                            timestamp: timestamp,
                            nonceStr: nonceStr,
                            signature: signature,
                            jsApiList: [
                                'scanQRCode',
                            ]
                        });

                    }
                    else {
                        layer.open({
                            content: res.message
                            ,skin: 'msg'
                            ,time: 2 //2秒后自动关闭
                        });
                    }
                },
                error:function () {
                    layer.open({
                        content: "服务器异常,请退出重试"
                        ,skin: 'msg'
                        ,time: 2 //2秒后自动关闭
                    });
                }
            });
        }
//        wx.
    }
</script>
<script src="https://antfresh-dev.oss-cn-hangzhou.aliyuncs.com/m/static/js/vendor/vendor/jquery/1.11.3/jquery.min.js"></script>
<!--<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>-->
<!--<script src="https://gw.alipayobjects.com/as/g/h5-lib/alipayjsapi/3.1.0/alipayjsapi.inc.min.js"></script>-->
<script src="./js/vendor/jquery/jquery-ui.js"></script>
<script src="./js/lib/waypoints.js"> </script>
<script src="./js/vendor/layer.mobile-v2.0/layer_mobile/layer.js"></script>
<script src="./js/lib/wxShare.js?v0.2.9"></script>
<script src="./js/lib/urlGet.js"></script>
<script src="./js/lib/config.js?v0.3.2"></script>
<script src="./js/lib/behavior.js"></script>
<script src="./js/vendor/swiper/swiper-4.1.0.min.js"></script>
<script src="./js/main.js?v1.0.5"></script>
</html>
